Document-based synonym generation

ABSTRACT

One embodiment of the present invention provides a system that automatically generates synonyms for words from documents. During operation, this system determines co-occurrence frequencies for pairs of words in the documents. The system also determines closeness scores for pairs of words in the documents, wherein a closeness score indicates whether a pair of words are located so close to each other that the words are likely to occur in the same sentence or phrase. Finally, the system determines whether pairs of words are synonyms based on the determined co-occurrence frequencies and the determined closeness scores. While making this determination, the system can additionally consider correlations between words in a title or an anchor of a document and words in the document as well as word-form scores for pairs of words in the documents.

RELATED APPLICATION

This application hereby claims priority under 35 U.S.C. §119 to U.S. Provisional Patent Application No. 60/900,271, filed on 7 Feb. 2007, entitled “Document-Based Synonym Generation,” by inventors Oleksandr Grushetskyy and Steven D. Baker.

BACKGROUND

The present invention generally relates to the field of information retrieval, and more specifically to the task of identifying synonyms for words to facilitate retrieving documents in response to queries which contain the words.

The World Wide Web (web) contains a vast amount of freely available information. However, locating a relevant item of information on the web can be a challenging task. Note that this problem continues to increase as the amount of information available on the web continues to grow.

Search engines can often help users to locate and retrieve a document of interest on the web. However, users often fail to select effective query terms during the searching process. For example, a user may enter the query [web hosting+fort wayne] when the city of Fort Wayne is usually referred to as Ft. Wayne. Or, a user may enter [free loops for flash movie] when most relevant pages use the term “music,” rather than “loops” and the term “animation” rather than “movie.” Thus, documents that satisfy a user's informational needs may use different terms than the specific query terms chosen by the user to express a concept of interest. Note that this problem becomes more of an issue as the number of terms in a query increases. For queries longer than three or four words, there is a strong likelihood that at least one of the terms is not the best term to describe the user's informational need.

Hence, there is a need to modify and/or expand user queries to include synonyms for query terms, so that retrieved documents will better meet the user's informational needs.

Unfortunately, solving this problem has proven to be a difficult task. A simple approach is to use pre-constructed synonym information, for example from a thesaurus or a structured lexical database. However, thesaurus-based systems have various problems. For example, they are often expensive to construct, and are generally restricted to one language.

Some systems consider how often terms are substituted for each other during query sessions to determine whether the terms are synonyms. However, there does not exist enough query data for rare words and rare languages to identify synonyms in this way.

Other systems consider stemming relationships to identify synonyms. However, stemming is not always accurate. For example, the words “university” and “universal” share the same stem, but have very different meanings. Furthermore, many good synonyms are not covered by stemming, such as “wolfs” and “wolves,” or “wales” and “welsh.”

Accordingly, what is needed is a method and an apparatus that identifies potential synonyms to facilitate searching operations without the above-described problems.

SUMMARY

One embodiment of the present invention provides a system that automatically generates synonyms for words from documents. During operation, this system determines co-occurrence frequencies for pairs of words in the documents. The system also determines closeness scores for pairs of words in the documents, wherein a closeness score indicates whether a pair of words are located so close to each other (for example, in sequential distance or logical distance) that the words are likely to occur in the same sentence or phrase. Finally, the system determines whether pairs of words are synonyms based on the determined co-occurrence frequencies and the determined closeness scores.

In some embodiments, determining a closeness score for a pair of words includes dividing the probability that the words are very close to each other by the probability that the words are near each other.

In some embodiments, words are determined to be “very close” to each other if they are less than a small number of words apart, such as 4 words, and words are determined to be “near” each other if they are within a pre-specified number words of each other, such as 100 words.

In some embodiments, while determining whether words are synonyms, the system considers a high closeness score between two words to indicate that the two words are unlikely to be synonyms because synonyms rarely occur in the same sentence or phrase.

In some embodiments, the system additionally generates correlations between words in a title or an anchor of a document and words in the document. In this variation, determining whether pairs of words are synonyms additionally involves considering the generated correlations.

In some embodiments, the system additionally determines word-form scores for pairs of words in the documents, wherein a high word-form score indicates that words share common portions, but have differing portions that are consistent with word form rules. Note that word-form rules specify a set of edits that that are allowed to a base word to produce gender-specific, plurality-related or other variations of the base word. For example, a high word-form score can indicate that: a pair of words share a common prefix but have different suffixes, wherein the different suffixes are consistent with word-form rules; a pair of words share a common suffix but have different prefixes, wherein the different prefixes are consistent with word-form rules; or a pair of words share a common prefix and a common suffix, but have different middle sections, wherein the different middle sections are consistent with word-form rules. In this variation, determining whether pairs of words are synonyms additionally involves considering the word-form scores.

In some embodiments, the system automatically generates the word-form rules from synonymous words that share common prefixes and/or suffixes.

In some embodiments, while determining whether a candidate word is a synonym for a target word, the system considers whether the candidate word is much more common than the target word. If so, the candidate word is not a synonym because search results produced by the candidate word will overwhelm search results produced by the target word. The system also considers whether the candidate word is much less common than the target word. If so, the candidate word is not a synonym because using the candidate word will produce very few additional search results.

In some embodiments, the system additionally processes a query. This involves first receiving the query which contains a set of words. Next, the system uses the synonyms which were automatically generated from the documents to identify one or more synonyms for the one or more words in the query. The system then generates an altered query using the one or more synonyms, and uses the altered query to produce search results. In one embodiment of the present invention, alternative synonyms are presented to a user through a user interface to enable the user to select the synonyms that are used to produce the altered query. Also note that when search results are returned the system can highlight or bold synonymous terms in search results.

Another embodiment of the present invention provides another system that automatically generates synonyms for words from documents. During operation, this system determines co-occurrence frequencies for pairs of words in the documents. The system also determines word-form scores for pairs of words in the documents, wherein a high word-form score indicates that a pair of words share a common prefix but have different endings, wherein the different endings are consistent with word-form rules. Finally, the system determines whether pairs of words are synonyms based on the determined co-occurrence frequencies and the determined word-form scores.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 illustrates the crawling, ranking and searching processes in accordance with an embodiment of the present invention.

FIG. 2 presents a flowchart illustrating a method for generating altered queries according to one embodiment of the present invention.

FIG. 3 presents a flow chart illustrating the process of automatically generating synonyms from words in a document in accordance with an embodiment of the present invention.

FIG. 4 presents a flow chart illustrating the process of automatically generating word-form rules in accordance with an embodiment of the present invention.

DETAILED DESCRIPTION

The following description is presented to enable one of ordinary skill in the art to make and use the invention, and is provided in the context of a particular application and its requirements. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present invention. Thus, the present invention is not limited to the embodiments shown, but is to be accorded the widest scope consistent with the claims.

The data structures and code described in this detailed description are typically stored on a computer-readable storage medium, which may be any device or medium that can store code and/or data for use by a computer system. This includes, but is not limited to, volatile memory, non-volatile memory, magnetic and optical storage devices such as disk drives, magnetic tape, CDs (compact discs), DVDs (digital versatile discs or digital video discs), or other media capable of storing computer readable media now known or later developed.

Crawling, Ranking and Searching Processes

FIG. 1 illustrates the crawling, ranking and searching processes in accordance with an embodiment of the present invention. During the crawling process, a web crawler 104 crawls or otherwise searches through websites on web 102 to select web pages to be stored in indexed form in data center 108. The selected web pages are then compressed, indexed and ranked in module 105 (using the ranking process described above) before being stored in data center 108.

During a subsequent search process, a search engine 112 receives a query 113 from a user 111 through a web browser 114. This query 113 specifies a number of terms to be searched for in the set of documents. In response to query 113, search engine 112 uses search terms specified in the query as well as synonyms for search terms to identify highly-ranked documents that satisfy the query. Search engine 112 then returns a response 115 through web browser 114, wherein the response 115 contains matching pages along with ranking information and references to the identified documents.

Generating Altered Queries

FIG. 2 presents a flowchart illustrating a method for generating altered queries according to one embodiment of the present invention. Initially, a search query is received from a client 110. In one embodiment, a front-end server is responsible for receiving the search query from the client (step 210). This front-end server provides the query to the search engine, which evaluates the query. In addition, the front-end server and/or search engine maintains various log files or lookup tables that storing each received query, as well as other information. More particularly, each query can be stored with a user identifier that identifies the particular browser and/or computer from which the query was received, a timestamp for the query, and a list of some number of the search results (e.g., a list of the top ten document IDs from the search). Other information related to user context or the search itself may also be stored.

Next, a list of search results for the search query is identified (step 220). In this example, the search engine evaluates the query to retrieve a set of search results in accordance with the search query and returns the results to the front-end server. The search engine communicates with one or more content servers to select documents that are relevant to the user's search query. Note that a content server stores a large number of indexed documents, indexed (and/or retrieved) from different websites. Alternatively, or in addition, the content server can store an index of documents stored on various websites. “Documents” are understood here to be any form of indexable content, including textual documents, images, video, audio, multimedia, presentations, and so forth.

In one embodiment, each indexed document is assigned a page rank according to the document's link structure. This page rank serves as a query-independent measure of the document's importance. The search engine assigns a score to each document based on the document's page rank (and/or other query-independent measure of the document's importance), as well as one or more query-dependent signals of the document's importance (e.g., the location and frequency of search terms in the document).

Then, one or more synonymous terms are identified (step 230) from a predetermined list. Formation of the predetermined list may be accomplished using various processes. More specifically, FIG. 3 presents a flowchart illustrating a process for determining automatically identifying synonyms from documents according to one embodiment of the present invention.

Next, referring back to FIG. 2, one or more altered queries are derived using the synonymous terms (step 240). Various methods exist for deriving alternative queries from the synonymous terms. In one embodiment, alternative queries are suggested that include the synonym, either as a substitution in or an addition to the query.

In another embodiment, the synonym is treated as equivalent to the original phrase automatically for purposes of document retrieval. For example, the original query can be modified by replacing the phrase with a synonym or a disjunction of the original phrase and a synonym when producing search results for the query.

From the above steps, a list of altered search results for the altered query is identified (step 250). In one embodiment, this list may include a maximum number of results.

Generating Synonyms from Documents

FIG. 3 presents a flow chart illustrating the process of automatically generating synonyms from words in a document in accordance with an embodiment of the present invention. First, the system determines co-occurrence frequencies for pairs of words in the documents (step 302). This can be easily accomplished using well-known statistical techniques.

The system also determines closeness scores for pairs of words in the documents (step 304), wherein a closeness score indicates whether a pair of words are located so close to each other that the words are likely to occur in the same sentence or phrase. For example, in one embodiment of the present invention, determining the closeness score for a pair of words involves dividing the probability that the words are very close to each other (e.g., within 4 words) by the probability that the words are near each other (e.g., within 100 words). Note that the system considers a high closeness score between two words to indicate that the two words are unlikely to be synonyms because synonyms rarely occur in the same sentence or phrase.

The system additionally generates correlations between words in a titles or URL anchors for documents and words in the documents (step 306). This helps to identify synonyms because a document tends to contain synonyms for words in the title or the anchor of the document.

The system also determines word-form scores for pairs of words in the documents (step 308). A high word-form score between a pair of words generally indicates that the words share a common portion and have differing portions, wherein the differing portions are consistent with word-form rules. A word for rule indicates how words with a common stem can vary. For example a high word form score can indicate that the pair of words: (1) share a common prefix but have different suffixes, wherein the different suffixes are consistent with word-form rules; (2) share a common suffix but have different prefixes, wherein the different prefixes are consistent with word-form rules; or (3) share a common prefix and a common suffix, but have different middle sections, wherein the different middle sections are consistent with word-form rules. The process of determining word-form rules is discussed in more detail below with reference to the flow chart which appears in FIG. 4.

Finally, the system determines whether pairs of words are synonyms based on the determined co-occurrence frequencies, closeness scores, title/anchor correlations, and word-form scores (step 310). Note that the closeness score is a negative indicator of a synonym, whereas the other factors are positive indicators.

While determining whether words are synonyms, the system can also consider relative frequencies of pairs of words. For example, if the candidate word is much more common than the target word, the candidate word will generally not be a good synonym because search results produced by the candidate word will overwhelm search results produced by the target word. Also, if the candidate word is much less common than the target word, the candidate word will generally not be a good synonym because using the candidate word will produce very few additional search results.

Generating Word-Form Rules

FIG. 4 presents a flow chart illustrating the process of automatically generating word-form rules in accordance with an embodiment of the present invention. The system first obtains pairs of words that are likely to be synonyms (step 402). This can involve considering a number of factors, such as the co-occurrence frequencies, closeness scores and title/anchor correlations described above. It can also involve obtaining pair of synonymous words using other techniques, such as examining word substitutions during query sessions.

Next, the system can generate word-form rules which indicate how related words which share a common stem can vary. For example, the system can generate word-form rules for pairs of words that share common parts, which can include prefixes, suffixes and/or middle sections, and wherein remaining parts of the pair of words are consistent with word-form rules (step 404).

The foregoing descriptions of embodiments of the present invention have been presented only for purposes of illustration and description. They are not intended to be exhaustive or to limit the present invention to the forms disclosed. Accordingly, many modifications and variations will be apparent to practitioners skilled in the art. Additionally, the above disclosure is not intended to limit the present invention. The scope of the present invention is defined by the appended claims. 

1. A method for automatically determining whether pairs of words are synonym pairs, comprising: determining co-occurrence frequencies for pairs of words in documents; determining closeness scores for pairs of words in the documents, wherein a closeness score indicates whether words in a pair of words are located so close to each other in the documents that the words are likely to occur in the same sentence or phrase; generating correlations between (i) words in a title or an anchor of each document in the documents and (ii) words in the document; and determining whether each of the pairs of words is a synonym pair based on the determined co-occurrence frequencies, the determined closeness scores, and the correlations, wherein a high closeness score is a negative indicator that a pair of words is a synonym pair, a high co-occurrence frequency is a positive indicator that the pair of words is a synonym pair, and a high correlation is a positive indicator that the pair of words is a synonym pair; wherein the determining co-occurrence frequencies, determining closeness scores, generating correlations, and determining whether each of the pairs of words is a synonym pair is performed by a computer system.
 2. The method of claim 1, wherein determining a closeness score for a pair of words includes dividing the probability that the words are very close to each other by the probability that the words are near each other.
 3. The method of claim 2, wherein words are determined to be very close to each other if they are less than a small number of words apart; and wherein words are determined to be near each other if they are within a pre-specified number of words of each other.
 4. The method of claim 3, wherein the small number of words apart is about 4 words; and wherein the pre-specified number of words is about 100 words.
 5. The method of claim 1, further comprising: determining word-form scores for pairs of words, wherein a high word-form score results when a pair of words share common parts, which can include prefixes, suffixes and/or middle sections, and wherein remaining parts of the pair of words are consistent with word-form rules; wherein determining whether each of the pairs of words is a synonym pair is further based on the word-form scores.
 6. The method of claim 1, wherein the method further comprises automatically generating the word-form rules from synonymous words that share common parts, which can include prefixes, suffixes and/or middle sections.
 7. The method of claim 1, further comprising: determining whether a candidate word in a pair of words is a synonym for a target word in the pair of words, the determining comprising: considering whether the candidate word is much more common than the target word, in which case the candidate word is not a synonym because search results produced by the candidate word will overwhelm search results produced by the target word; and considering whether the candidate word is much less common than the target word in which case the candidate word is not a synonym because using the candidate word will produce very few additional search results.
 8. The method of claim 1, wherein the method further comprises: receiving a query containing words; using the synonym pairs to identify one or more synonyms for the one or more words in the query; generating an altered query using the one or more synonyms; and using the altered query to produce search results.
 9. A method for automatically determining whether pairs of words are synonym pairs, comprising: determining co-occurrence frequencies for pairs of words in documents; determining closeness scores for pairs of words in the documents, wherein a closeness score indicates whether words in a pair of words are located so close to each other in the documents that the words are likely to occur in the same sentence or phrase; determining word-form scores for pairs of words in the documents, wherein a high word-form score results when a pair of words share common parts, which can include prefixes, suffixes and/or middle sections, and wherein remaining parts of the pair of words are consistent with word-form rules; generating correlations between (i) words in a title or an anchor of each document in the documents and (ii) words in the document; and determining whether pairs of words are synonyms based on the determined co-occurrence frequencies, the determined closeness scores, the determined word-form scores, and the generated correlations, wherein a high co-occurrence frequency is a positive indicator that the pair of words is a synonym pair, a high closeness score is a negative indicator that a pair of words is a synonym pair, a high word-form score is a positive indicator that the pair of words is a synonym pair, and a high correlation is a positive indicator that the pair of words is a synonym pair; wherein the determining co-occurrence frequencies, determining closeness scores, generating correlations, and determining whether each of the pairs of words is a synonym pair is performed by a computer system.
 10. A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform operations comprising: determining co-occurrence frequencies for pairs of words in documents; determining closeness scores for pairs of words in the documents, wherein a closeness score indicates whether words in a pair of words are located so close to each other in the documents that the words are likely to occur in the same sentence or phrase; generating correlations between (i) words in a title or an anchor of each document in the documents and (ii) words in the document; and determining whether each of the pairs of words is a synonym pair based on the determined co-occurrence frequencies, the determined closeness scores, and the correlations, wherein a high closeness score is a negative indicator that a pair of words is a synonym pair, a high co-occurrence frequency is a positive indicator that the pair of words is a synonym pair, and a high correlation is a positive indicator that the pair of words is a synonym pair.
 11. The computer-readable storage medium of claim 10, wherein determining a closeness score for a pair of words includes dividing the probability that the words are very close to each other by the probability that the words are near each other.
 12. The computer-readable storage medium of claim 11, wherein words are determined to be very close to each other if they are less than a small number of words apart, such as 4 words; and wherein words are determined to be near each other if they are within a pre-specified number of words of each other, such as 100 words.
 13. The computer-readable storage medium of claim 12, wherein the small number of words apart is about 4 words; and wherein the pre-specified number of words is about 100 words.
 14. The computer-readable storage medium of claim 10, wherein determining whether pairs of words are synonyms additionally involves: determining word-form scores for pairs of words, wherein a high word-form score results when a pair of words share common parts, which can include prefixes, suffixes and/or middle sections, and wherein remaining parts of the pair of words are consistent with word-form rules; and analyzing the word-form scores when determining whether pairs of words are synonym pairs.
 15. The computer-readable storage medium of claim 10, wherein the method further comprises automatically generating the word-form rules from synonymous words that share common parts, which can include prefixes, suffixes and/or middle sections.
 16. The computer-readable storage medium of claim 10, further operable to perform operations comprising: determining whether a candidate word in a pair of words is a synonym for a target word in a pair of words, the determining comprising: considering whether the candidate word is much more common than the target word, in which case the candidate word is not a synonym because search results produced by the candidate word will overwhelm search results produced by the target word; and considering whether the candidate word is much less common than the target word in which case the candidate word is not a synonym because using the candidate word will produce very few additional search results.
 17. The computer-readable storage medium of claim 10, further operable to perform operations comprising: receiving a query containing words; using the synonym pairs to identify one or more synonyms for the one or more words in the query; generating an altered query using the one or more synonyms; and using the altered query to produce search results.
 18. A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform operations comprising: determining co-occurrence frequencies for pairs of words in documents; determining closeness scores for pairs of words in the documents, wherein a closeness score indicates whether words in a pair of words are located so close to each other in the documents that the words are likely to occur in the same sentence or phrase; determining word-form scores for pairs of words in the documents, wherein a high word-form score results when a pair of words share common parts, which can include prefixes, suffixes and/or middle sections, and wherein remaining parts of the pair of words are consistent with word-form rules; generating correlations between (i) words in a title or an anchor of each document in the documents and (ii) words in the document; and determining whether pairs of words are synonyms based on the determined co-occurrence frequencies, the determined closeness scores, the determined word-form scores, and the generated correlations, the determined word-form scores, and the generated correlations, wherein a high co-occurrence frequency is a positive indicator that the pair of words is a synonym pair, a high closeness score is a negative indicator that a pair of words is a synonym pair, a high word-form score is a positive indicator that the pair of words is a synonym pair, and a high correlation is a positive indicator that the pair of words is a synonym pair.
 19. A system, comprising: one or more computers configured to perform operations comprising: determining co-occurrence frequencies for pairs of words in documents; determining closeness scores for pairs of words in the documents, wherein a closeness score indicates whether words in a pair of words are located so close to each other in the documents that the words are likely to occur in the same sentence or phrase; generating correlations between (i) words in a title or an anchor of each document in the documents and (ii) words in the document; and determining whether each of the pairs of words is a synonym pair based on the determined co-occurrence frequencies, the determined closeness scores, and the correlations, wherein a high closeness score is a negative indicator that a pair of words is a synonym pair, a high co-occurrence frequency is a positive indicator that the pair of words is a synonym pair, and a high correlation is a positive indicator that the pair of words is a synonym pair; wherein the determining co-occurrence frequencies, determining closeness scores, generating correlations, and determining whether each of the pairs of words is a synonym pair is performed by a computer system.
 20. A system, comprising: one or more computers configured to perform operations comprising: determining co-occurrence frequencies for pairs of words in documents; determining closeness scores for pairs of words in the documents, wherein a closeness score indicates whether words in a pair of words are located so close to each other in the documents that the words are likely to occur in the same sentence or phrase; determining word-form scores for pairs of words in the documents, wherein a high word-form score results when a pair of words share common parts, which can include prefixes, suffixes and/or middle sections, and wherein remaining parts of the pair of words are consistent with word-form rules; generating correlations between (i) words in a title or an anchor of each document in the documents and (ii) words in the document; and determining whether pairs of words are synonyms based on the determined co-occurrence frequencies, the determined closeness scores, the determined word-form scores, and the generated correlations, wherein a high co-occurrence frequency is a positive indicator that the pair of words is a synonym pair, a high closeness score is a negative indicator that a pair of words is a synonym pair, a high word-form score is a positive indicator that the pair of words is a synonym pair, and a high correlation is a positive indicator that the pair of words is a synonym pair; wherein the determining co-occurrence frequencies, determining closeness scores, generating correlations, and determining whether each of the pairs of words is a synonym pair is performed by a computer system.
 21. A computer implemented method for automatically determining whether pairs of words are synonym pairs, comprising: determining, for a pair of words, a co-occurrence frequency of the pair of words in a plurality of documents; determining a closeness score for the pair of words in the plurality of documents, wherein the closeness score is derived from how close a first and a second word appear to each other in the plurality of documents; generating a correlation between (i) one of the words in each pair of words appearing in a title or anchor of each of one or more documents and (ii) another word in the pair of words appearing in each of the one or more documents; determining whether the pair of words is a synonym pair according to the co-occurrence frequency, the closeness score, and the correlation, wherein a high closeness score is a negative indicator that the pair of words is a synonym pair, a high co occurrence frequency is a positive indicator that the pair of words is a synonym pair, and a high correlation is a positive indicator that the pair of words is a synonym pair.
 22. A computer-implemented method for automatically determining whether pairs of words are synonym pairs, comprising: determining co-occurrence frequencies for pairs of words in documents; determining closeness scores for pairs of words in the documents, wherein a closeness score indicates whether words in a pair of words are located so close to each other in the documents that the words are likely to occur in the same sentence or phrase; determining word-form scores for pairs of words in the documents, wherein a word-form score specifies an extent to which a pair of words share common parts and an extent to which, which can include prcfixcs, cuffixcs and/or remaining parts of the pair of words are consistent with word-form rules, wherein the common parts include one or more prefixes, suffixes, and middle sections, and wherein a word-form rule designates acceptable variations among words that share a common stem; and determining whether each of the pairs of words is a synonym pair based on the determined co-occurrence frequencies, the determined closeness scores, and an analysis of the word-form scores. 